<template>
	<view>
		<image src="../../static/imags/login/bg.png" class="bgimg"></image>
		<view class="top">
			<view :style="{'width':'100%','height':height}"></view>
			<view class="toptitle">
				<view class="iconview">
					<image src="../../static/imags/index/jb.png" class="jbimg"></image>
					<view class="box">{{coin}}</view>
				</view>
				
				<view class="iconview iconviewhb">
					<image src="../../static/imags/index/hb.png" class="jbimg1"></image>
					<view class="box">{{money}}元</view>
				</view>
			</view>
			<view class="tabbar">
				<view class="tabbartop">
					<view class="caige" v-if="checkindex==1" @tap="checktab(0)">
						<image src="../../static/imags/renwu/cgrw1.png"></image>
					</view>
					<view class="meiri" v-if="checkindex==1"  @tap="checktab(1)">
						<image src="../../static/imags/renwu/mrrw1.png"></image>
					</view>
					<view class="caige1" v-if="checkindex==0"  @tap="checktab(0)">
						<image src="../../static/imags/renwu/cgrw.png" mode=""></image>
					</view>
					<view class="meiri1" v-if="checkindex==0"  @tap="checktab(1)">
						<image src="../../static/imags/renwu/mrrw.png"></image>
					</view>
				</view>
				<image src="../../static/imags/renwu/db1.png" mode="widthFix" class="tabimg" style="width: 700rpx;height: 29rpx;" v-if="checkindex==1"></image>
				<image src="../../static/imags/renwu/db.png" mode="widthFix" class="tabimg" style="width: 700rpx;height: 29rpx;" v-if="checkindex==0"></image>
			</view>
		</view>
		<view class="zhanwei"></view>
        
        <view style="height: 320rpx;width: 100%;"></view>
        <view class="caigebox" v-if="firstjiangli==0 && checkindex==0">
        	<view class="title">距离提现0.3元还差{{5-leijicaiduigequ}}首歌</view>
        	<view class="process">
        		<view class="left">
        			<view class="jindutiaobox" style="margin-top: 45rpx;">
        				<view class="jindutiao" :style="{width: (leijicaiduigequ/5*390) + 'rpx'}"></view>
        			</view>
        		</view>
        		<view class="button" @click="gomine">
        			<image src="../../static/imags/renwu/txan.png"></image>
        		</view>
        	</view>
        </view>
		<view style="height: 40rpx;width: 100%;" v-if="firstjiangli==0 && checkindex==0"></view>
		<view class="caigebox" v-if="checkindex==0">
			<view class="title">距离下次现金抽奖还差{{tixiancaidui>needsong?1:needsong-tixiancaidui}}首歌</view>
			<view class="process">
				<view class="left">
					<view class="jindutiaobox">
						<view class="jindutiao" :style="{width: (tixiancaidui>needsong?(1/needsong*390):(tixiancaidui/needsong*390)) + 'rpx'}"></view>
					</view>
					<view class="miaoshu">猜歌即可抽奖！机会多多、金额不限！</view>
				</view>
				<view class="button" @click="gomine">
					<image src="../../static/imags/renwu/txan.png"></image>
				</view>
			</view>
		</view>
		
		<view v-if="checkindex==0">
			<view class="caigebox1" v-for="(item,index) in list" :key="index">
				<view class="topbox">
					<view class="title">{{item.title}}</view>
					<view class="tixianjihui" v-if="item.tixian==1">
						<image src="../../static/imags/renwu/txjh.png" mode="widthFix"></image>
					</view>
					<view class="jindu">{{item.wancheng}}/{{item.num}}</view>
					<view class="jindubarbox"><view class="jindubar" :style="{width: ((item.wancheng/item.num)*125) + 'rpx'}"></view></view>
				</view>
				<view class="bottombox">
					<view class="hongbao">
						<view class="count">{{item.count}}</view>
						<view :class="item.count==''?'image image1':'image'">
                            <image src="../../static/imags/renwu/jb1.png" style="width: 47rpx;height: 47rpx;" v-if="item.rewardtype==1"></image>
							<image src="../../static/imags/index/hb.png" style="width: 41rpx;height: 47rpx;" v-if="item.rewardtype==0"></image>
							<view class="money">{{item.coin>10000?item.coin/10000+'万':item.coin}}</view>
						</view>
					</view>
					<view class="buttom">
						<image src="../../static/imags/renwu/lqjl.png" mode="" v-if="item.status==1" @tap="lingqujiangli(item,index)"></image>
						<image src="../../static/imags/renwu/wwc.png" mode="" v-if="item.status==0"></image>
						<image src="../../static/imags/renwu/ylq.png" mode="" v-if="item.status==2"></image>
					</view>
				</view>
			</view>
		</view>
		
		<view class="qiandaobox" v-if="checkindex==1">
			<view class="jinriqiandao">
				<image src="../../static/imags/renwu/jrqd.png" mode="widthFix" class="img1"></image>
				<image src="../../static/imags/renwu/lqjl.png" mode="widthFix" class="img2" @tap="qiandaojiangli"></image>
			</view>
			<view class="qiandaojindubox">
				<view class="qiandaojindubar">
					<progress :percent="percent" backgroundColor="#4D69BF" activeColor="#F95300" border-radius="20" />
				</view>
				<view class="qiandaoitembox">
					<view class="item" v-for="(item,index) in jianglilist" :key="index">
						<view :class="item.status==1 || item.status==3?'coin coin1':'coin'" :style="item.status==2?{'color':'#F95300'}:{}" v-if="index<4" >+{{item.coin}}</view>
						<view class="quanqin" v-if="index>=4">全勤奖</view>
						<image src="../../static/imags/renwu/jb.png" v-if="item.status==1 || item.status==3 && index<4" class="jinbi"></image>
						<image src="../../static/imags/renwu/jb1.png" v-if="item.status==0 || item.status==2 && index<4" class="jinbi"></image>
						<image src="../../static/imags/renwu/lw.png" v-if="index==4" class="liwu"></image>
						<view :class="item.status==1 || item.status==3?'status status1':'status'" :style="item.status==2?{'color':'#F95300'}:{}">{{item.status==1 || item.status==3?(item.status==1?'已领取':'已过期'):item.time+'点领取'}}</view>
					</view>
				</view>
			</view>
		</view>
		
        <view class="caigebox1" v-if="checkindex==1">
            <view class="topbox">
            	<view class="title">观看视频{{needvido}}次</view>
  
            	<view class="jindu">{{todayseevideo>needvido?needvido:todayseevideo}}/{{needvido}}</view>
            	<view class="jindubarbox"><view class="jindubar" :style="{width: (((todayseevideo>needvido?needvido:todayseevideo)/needvido)*125) + 'rpx'}"></view></view>
            </view>
            <view class="bottombox">
            	<view class="hongbao">
                    <view class="hongbao">
                        <view style="height: 30rpx;"></view>
                    	<view class="count">今日累计观看视频{{needvido}}次可获得幸运提现</view>
                    </view>
            	</view>
            	<view class="buttom">
            		<view class="videobutton" @click="showAd(1)" v-if="!videobutton">看视频</view>
                    <view class="videobutton" v-if="videobutton">{{videobutton}}</view>
            	</view>
            </view>
        </view>
        
		<view v-if="checkindex==1">
			<view class="caigebox1" v-for="(item,index) in list1" :key="index">
				<view class="topbox">
					<view class="title">{{item.title}}</view>
					<view class="tixianjihui" v-if="item.tixian==1">
						<image src="../../static/imags/renwu/txjh.png" mode="widthFix"></image>
					</view>
					<view class="jindu">{{item.wancheng}}/{{item.num}}</view>
					<view class="jindubarbox"><view class="jindubar" :style="{width: ((item.wancheng/item.num)*125) + 'rpx'}"></view></view>
				</view>
				<view class="bottombox">
					<view class="hongbao">
                       <!-- <view class="count">1111</view>
						<view class="image image1">
                            <image src="../../static/imags/renwu/jb1.png" style="width: 49rpx;height: 49rpx;" v-if="item.rewardtype==1"></image>
                            <image src="../../static/imags/index/hb.png" style="width: 41rpx;height: 47rpx;" v-if="item.rewardtype==0"></image>
							<view class="money">X{{item.coin}}</view>
						</view> -->
                        
                        <view class="hongbao">
                        	<view class="count">{{item.count}}</view>
                        	<view :class="item.count==''?'image image1':'image'">
                                <image src="../../static/imags/renwu/jb1.png" style="width: 47rpx;height: 47rpx;" v-if="item.rewardtype==1"></image>
                        		<image src="../../static/imags/index/hb.png" style="width: 41rpx;height: 47rpx;" v-if="item.rewardtype==0"></image>
                        		<view class="money">{{item.coin>10000?item.coin/10000+'万':item.coin}}</view>
                        	</view>
                        </view>
					</view>
					<view class="buttom">
						<image src="../../static/imags/renwu/lqjl.png" mode="" v-if="item.status==1" @tap="lingqujiangli(item,index)"></image>
						<image src="../../static/imags/renwu/wwc.png" mode="" v-if="item.status==0"></image>
						<image src="../../static/imags/renwu/ylq.png" mode="" v-if="item.status==2"></image>
					</view>
				</view>
			</view>
		</view>
		
		<view class="tishibox" v-if="checkindex==0">
			听万歌，领万元</br>
			猜对指定首歌曲后，解锁下一个红包奖励
		</view>
		
		<uni-popup ref="popup" :maskClick="false">
			<view class="huodemoney">
				<view class="close" @tap="closepopup(0)"></view>
				<view style="width: 100%;height: 300rpx;"></view>
				<view class="title">获得奖励<span>{{taskinfo.coin}}</span>{{taskinfo.type}}</view>
				<view style="width: 100%;height: 100rpx;"></view>
				<view class="button" @tap="closepopup(1)">
                    看视频获得{{videofanbei.min}}-{{videofanbei.max}}倍奖励
                </view>
			</view>
		</uni-popup>
		
		<view class="toast" v-if="showtoastdialog">{{toasttitle}}</view>
	</view>
</template>

<script>
	export { default } from "./renwu.js";
</script>

<style>
	@import url("./renwu.css");
</style>
